home *** CD-ROM | disk | FTP | other *** search
/ Whiteline: delta / whiteline CD Series - delta.iso / tex / style / misc / newequat.sty < prev    next >
Text File  |  1995-11-25  |  871b  |  29 lines

  1. % newequation.sty
  2. %
  3. % 12 Jan 91  Created.
  4. %            clayton@thumper.bellcore.com
  5. %
  6. % newequation.sty defines the \newequation command, which defines
  7. % new equation environments.  The command format is
  8. %
  9. %    \newequation{name}{format}
  10. %
  11. % where "name" is the name of the new equation environment and "format"
  12. % is the format of the equation number.  For example,
  13. %
  14. %    \newequation{define}{(D\arabic{define})}
  15. %
  16. % The new environment follows Latex's numbered sections convention:
  17. % there's a counter called "name" and a command called \the"name" with
  18. % "format" as its initial definition.  See section 5.3 in the Latex
  19. % user's guide for more on numbering.
  20.  
  21. \def \newequation#1#2{
  22.    \@definecounter{#1}
  23.    \@namedef{the#1}{\hbox{#2}}
  24.    \@namedef{#1}{$$\refstepcounter{#1}}
  25.    \@namedef{end#1}{
  26.       \eqno \csname the#1\endcsname $$\global\@ignoretrue
  27.       }
  28.    }
  29.